vcKinSolver

A standalone object that can be used for forward and inverse kinematics calculations. The object is stateful and must be configured before calling forward or inverse methods. The Base and Root matrices must be given in a common reference e.g. the simulation World coordinates that can be retrieved e.g. by using the vcKinematicFrame position getters.

See in: Overview

Module: vcRobotics2

Parent: -

Children -

Referenced by: vcKinematics.MainSolver, vcKinematics.createSolver()

Properties

Learn how to use properties here. The properties are also inherited from the parent class.

NameTypeAccessDescription
BaseMatrixvcMatrixRWGets or sets the base frame transformation used in the calculation.
See more
Base and root matrices must be given in the same frame of reference e.g. simulation World.
To acquire current position use vcKinematicFrame.WorldPositionMatrix.
Set any driver values the frame location may depend on before retrieving the position.

Exceptions:
RuntimeError: When solver is the main/read-only.
PassiveValuePropertiesvcPropertyContainerRGets the properties for passive joint values.
PropertiesvcPropertyContainerRGets the properties of the solver.
RootMatrixvcMatrixRWGets or sets the robot root frame transformation used in the calculation.
See more
Base and root matrices must be given in the same frame of reference e.g. simulation World.
To acquire current position use vcKinematicFrame.WorldPositionMatrix.
Set any driver (e.g. robot positioner) values the frame location may depend on before retrieving the position.

Exceptions:
RuntimeError: When solver is the main/read-only.
StatusvcKinSolverStatusRGets the status of the solver.
ToolMatrixvcMatrixRWGets or sets the tool frame position relative to the robot flange frame.

Exceptions:
RuntimeError: When solver is the main/read-only.
WristMaskIntegerRGets a driver mask that defines wrist drivers (if any). Hi-bit indicates a wrist. Indexing starts from LSB, which is the first driver.

Methods

Learn how to use methods here. The methods are also inherited from the parent class.

NameReturn TypeParametersDescription
forwardobjectList[Real] argSolves the forward problem with the given driver values and assigned root, base and tool frame positions.
See more
To get the solution (target), call getForwardSolution().
To check the error, call getStatus().

Parameters:
driverValues (list[float]): internal driver values.

Returns:
vcMatrix | None: Tool frame position in reference to base frame, or None in case of failure.

Exceptions:
RuntimeError: When solver is the main (read-only) solver.
getConfigurationvcRobotConfigurationList[Real] driverValuesReturns a configuration object based on the given driver values.
See more
Each type of solver may have different configuration properties, which are returned with this object.

For example, an articulated kinematics solver has an integer property named "Configuration",
whose value can be interpreted as a bitmask where the least significant bits mean the following:
- 100: wrist is behind the robot (Back), not Front
- 010: elbow is Below, not Above
- 001: wrist is Flipped
Integer zero means: Front, Above, no flip.

Parameters:
driverValues (list[float]): internal driver values.

Returns:
vcRobotConfiguration: The configuration at the given driver values.
getInverseSolutionlist[Real]NoneReturns the last succesful inverse -call result.
See more
Can be called multiple times to retrieve alternative solutions. Returns an empty list when no further solutions are available.
More than one solution can be available after an inverse call with vcRobotConfiguration.UseNearestConfiguration enabled.

Parameters:
None

Returns:
list[float]: internal driver values without turns applied i.e. all rotational values are within [0...180].

Exceptions:
RuntimeError: When solver is the main/read-only.
inverseBooleanvcMatrix target,
List[Real] refDriverValues,
vcRobotConfiguration config,
Optional Keyword[driverMask = Integer]
Solves the inverse problem with the given values and assigned root, base and tool frame positions.

To get the solution (target), call getInverseSolution().
See more
To check the error, call getStatus().

Parameters:
target (vcMatrix): target tool position relative to the base.
refDriverValues (list[float]): reference internal driver values used with numerical solver and for nearest configuration. Using the last known/current values is adviced.
config (vcRobotConfiguration): desired configuration. Retrieve a valid (resusable) configuration object by calling vcKinSolver.getConfiguration().
Optional: driverMask (int): Zero by default. Defines which of the reference values are locked. Used when e.g. wrist is locked.
A zero means all drivers are free. Hi-bit indicates a locked driver, the first driver is the LSB i.e. "000001".

Returns:
bool: True on success, False on failure.

Exceptions:
RuntimeError: When solver is the main/read-only.